package com.tvunetworks.center.user.service;

import com.tvunetworks.center.common.model.LoginUser;
import com.tvunetworks.center.common.util.Result;
import com.tvunetworks.center.user.model.vo.ExtBindReceiverVo;

import java.util.List;
/**
 * @program: tvucc-aggregator
 * @author lebronchen
 * @create: 2020-04-24 13:17
 **/
public interface ExtService {
    /**
     * 添加device到device服务并发送ext到receiver
     * @param name name
     * @param url url
     * @param type type
     * @param rid rid
     * @param remark remark
     * @return Result
     */
    Result<String> addExtNoUser(String name, String url, String type, String rid,String remark);

    /**
     *
     * @param loginUser loginUser
     * @param name name
     * @param url  url
     * @param type type
     * @param rid rid
     * @param remark remark
     * @return Result
     */
    Result<String> addExtToUser(LoginUser loginUser, String name, String url, String type, String rid,String remark);

    /**
     *
     * @param peerId peerId
     * @param name name
     * @param url url
     * @param remark remark
     * @return Result
     */
    Result updateExt(String peerId, String name, String url,String remark);

    /**
     *
     * @param peerId peerId
     * @return Result
     */
    Result<String> deleteExt(String peerId);

    /**
     *
     * @param userId userId
     * @param peerId peerId
     * @param  condition condition
     * @return List
     */
    List<ExtBindReceiverVo> listExtBindedRids(String userId, String peerId, String condition);

    /**
     *
     * @param userId userId
     * @param peerId peerId
     * @param condition condition
     * @return List
     */
    List<ExtBindReceiverVo> listExtUnBindRids(String userId, String peerId, String condition);

    /**
     *
     * @param peerId peerId
     * @param addRids addRids
     * @param removeRids removeRids
     */
    void correlateExtPairedR(String peerId, String addRids, String removeRids);

    /**
     * cc前端添加EXT
     * @param loginUser loginUser
     * @param name extname
     * @param url  extUrl
     * @param type ext 类型
     * @param rid rid
     * @param remark 备注
     * @return Result
     */
    Result<String> addExtToUserByCC(LoginUser loginUser, String name, String url, String type, String rid, String remark);
}
